#ifndef SDRAGON_GENERALINCLUDES_H_INCLUDED
#define SDRAGON_GENERALINCLUDES_H_INCLUDED


#ifdef BUILD_DLL
    #define DLL_EXPORT __declspec(dllexport)
#else
    #define DLL_EXPORT __declspec(dllimport)
#endif



#include <stdlib.h>
#include <SDL.h>
#include <SDL_libs/SDL_image.h>
#include <SDL_libs/SDL_ttf.h>
#include <SDL_thread.h>
#include <SDL_mutex.h>
#include <SDL_timer.h>

#include "SDragon_Debug.h"

enum SDR_Error
{
    // Window Errors

    SDR_NO_ERROR,
    SDR_ERROR_INIT_SDL,
    SDR_ERROR_INIT_TTF_LIB,
    SDR_ERROR_NULL_WINDOW,
    SDR_ERROR_NULL_CURSOR,
    SDR_ERROR_NULL_SURFACE,
    SDR_ERROR_NULL_BUTTON,
    SDR_ERROR_NULL_ANIMATION,
    SDR_ERROR_NULL_SURFACE_LIST_ELEMENT,
    SDR_ERROR_NULL_SDL_EVENT,
    SDR_ERROR_NULL_EVENT,
    SDR_ERROR_NULL_EVENT_LIST,
    SDR_ERROR_LOAD_SCREEN,
    SDR_ERROR_MALLOC_RECT,
    SDR_ERROR_MALLOC_EVENT,
    SDR_ERROR_MALLOC_SURFACE_LIST_ELEM,
    SDR_ERROR_MALLOC_ANIMATION_LIST_ELEM


    // Surface Errors
};
typedef enum SDR_Error SDR_Error;

#define SDR_checkNull(pointer) if(pointer == NULL) return
#define SDR_checkNullReturn(pointer, whatToReturn) if(pointer == NULL) return whatToReturn
#define SDR_checkNullMsgReturn(pointer, msg, whatToReturn) if(pointer == NULL){ SDR_error(msg); return whatToReturn; }

#endif // SDRAGON_GENERALINCLUDES_H_INCLUDED
